package com.slz3.business.frame.route;

import com.slz3.business.frame.functions.*;
import com.slz3.business.frame.util.HumpToUnderline;

public class Pattern {

    public static final String ADD = pattern(Add.class);
    public static final String DELETE = pattern(Delete.class);
    public static final String MODIFY = pattern(Modify.class);
    public static final String INFO = pattern(Info.class);
    public static final String QUERY = pattern(Query.class);
    public static final String LIST = pattern(List.class);
    public static final String FINDBYSERORDERID = pattern(FindBySerOrderId.class);
    public static final String FIND_BY_SER_AFTER_SALE_ID = pattern(FindBySerAfterSaleId.class);
    public static final String EXPORT = pattern(Export.class);
    public static final String IMPORT = pattern(Import.class);
    public static final String CHOICE = pattern(Choice.class);
    public static final String AUDIT_SUBMIT = pattern(AuditSubmit.class);
    public static final String AUDIT = pattern(Audit.class);
    public static final String AUDIT_REJECT = pattern(AuditReject.class);
    public static final String USING_ENABLE = pattern(UsingEnable.class);
    public static final String USING_DISABLE = pattern(UsingDisable.class);
    public static final String UPLOAD_OBJECT = pattern(UploadObject.class);
    public static final String REPORT = pattern(Report.class);
    public static final String REGISTER = pattern(Register.class); // 注册
    public static final String LOGIN = pattern(Login.class); // 登录
    public static final String LOGOUT = pattern(Logout.class); // 退出
    public static final String LOTTERY = pattern(Lottery.class);
    public static final String SYNC = pattern(Sync.class);
    protected static String pattern(Class<?> clazz) {
        return "/".concat(HumpToUnderline.convert(clazz.getSimpleName()).substring(1)).concat("/");
    }

}
